<!--
 * @Author: your name
 * @Date: 2020-08-22 01:51:42
 * @LastEditTime: 2020-08-27 14:49:08
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \exam-list\src\components\checkpaper\PaperDetail.vue
-->
<template>
  <div class>
    <h2>试题详情</h2>
    <div class="questionsdetail">
      <card class="left">
        <p>
          出题人:
          <span>{{obj.user_name}}</span>
        </p>
        <div>
          <Tag type="border" color="primary" size="large">{{obj.exam_name}}</Tag>
          <Tag type="border" color="error">{{obj.questions_type_text}}</Tag>
          <Tag type="border" color="success">{{obj.subject_text}}</Tag>
        </div>
        <MarkdownPreview :initialValue="obj.title" />
        <MarkdownPreview :initialValue="obj.questions_stem" />
      </card>
      <card class="right">
        <h3>答案信息</h3>
        <MarkdownPreview :initialValue="obj.questions_answer" />
      </card>
    </div>
  </div>
</template>

<script>
// import EditorBar from '../wangEnduit/wangEnduit'
import { MarkdownPreview } from 'vue-meditor'
export default {
  components: {
    // 引入组件
    MarkdownPreview
    // EditorBar
  },
  data() {
    return {
      isClear: false,
      obj: {},
      placeholderValue: '请输入问题描述', // placeholder的内容
      initialValue: '123', // markdown默认值
      theme: 'OneDark' // 主题
    }
  },
  created() {
    this.obj = this.$route.query
    console.log(this.obj)
  },
  methods: {
    change(val) {
      console.log(val)
    },
    save() {},
    changeImg() {}
  }
}
</script>

<style lang="scss" scoped>
.questionsdetail {
  display: flex;
  justify-content: space-around;

  .left {
    width: 66%;
  }

  .right {
    width: 33%;
  }
}
</style>
